<template>
  <div class="hw-flex-style-c-c parent-box">
    <div class="title">
      <titleLeft />
      <div class="hw-flex-style-c-c title-style-box">
        <titleCenter />

        <span
          class="title-boxs-item"
          :style="{
            fontSize: store.styleInfo.titleSize,
            fontFamily: 'SourceHanSerifCN-Bold',
            color: store.styleInfo.fontColor,
          }"
          >{{ props.title }}</span
        >
      </div>
      <titleRight />
    </div>
    <p
      class="subTitle-boxs-item"
      v-if="props.subTitle"
      :style="{
        fontFamily: 'SourceHanSerifCN',
        color: store.styleInfo.fontColor,
      }"
    >
      ——{{ props.subTitle }}
    </p>
  </div>
</template>

<script setup lang="ts">
// @ts-nocheck
import titleLeft from './titleLeft.vue';
import titleRight from './titleRight.vue';
import titleCenter from './titleContent.vue';
import { useProjectStore } from '@/store';

const store = useProjectStore();
const props = defineProps({
  title: {
    type: String,
  },
  subTitle: {
    type: String,
  },
});
</script>

<style lang="less" scoped>
// .hw-flex-style-c-c {
//   align-items: center !important;
// }

.title-style-box-item {
  width: 100%;
}
.parent-box {
  position: relative;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: start;
  // padding: 0 48px;
}
.title {
  display: flex;
}
.subTitle-boxs-item {
  font-size: 20px;
  line-height: 30px;
  margin-top: 10px;
}
// .hw-flex-style-c-c {
// height: 58px;
// }
.title-boxs-item {
  position: relative;
  display: flex;
  max-width: 100%;
  height: 48px;
  padding: 0 16px;
  line-height: 48px;
  font-size: 32px !important;
}
.title-style-box {
  display: flex;
  position: relative;
  max-width: 100%;
  // min-width: 168px;
  padding: 0px 0px;
  height: 48px;
  overflow: hidden;
  span {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}
</style>
